<?php
namespace Admin\Controller;
use Common\Controller\AdminbaseController;
// +----------------------------------------------------------------------
// | Date:2016年11月22日
// +----------------------------------------------------------------------
// | Author: EK_熊<1439527494@qq.com>
// +----------------------------------------------------------------------
// | Description: 此文件作用于****
// +----------------------------------------------------------------------
class ProjectController extends AdminbaseController{
    
    protected $model;
    protected $status;
    protected $type;
    public function _initialize(){
        parent::_initialize();
        $this->model = D('project');
        $this->status = ['0'=>'禁用','1'=>'正常'];

    }
    
    public function index(){
    
        $keyword = I('keyword');
        if ($keyword['name']) $where['pro_name'] = array('like',"%{$keyword['name']}%");
        $where['status'] = ['gt',0];
        $list = $this->lists($this->model,$where,$order='created_time DESC',$field);
    
        $this->assign('list',$list);
        $this->assign('status',$this->status);
        $this->display();
    }
}